# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

pkgname=libdca
pkgver=0.0.7
pkgrel=2
pkgdesc='Library for decoding DTS Coherent Acoustics streams'
arch=('loong64' 'x86_64')
url='https://www.videolan.org/developers/libdca.html'
license=('GPL')
depends=('bash' 'glibc')
source=("https://download.videolan.org/pub/videolan/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2")
sha256sums=('3a0b13815f582c661d2388ffcabc2f1ea82f471783c400f765f2ec6c81065f6a')

prepare() {
  cd $pkgname-$pkgver
  sed -i '/DESTDIR/ s/\.1/.1.gz/g' src/Makefile.am
  sed -i '/libdts.a/d' libdca/Makefile.am
  ./bootstrap
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
